Cope if xenstore is down.
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Thu, 2 Mar 2006 20:45:13 +0000 (21:45 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Thu, 2 Mar 2006 20:45:13 +0000 (21:45 +0100)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/xenstore/xenstore_control.c

index 5433bfc811488c3be89639e388649c9e50773110..0be80261e4ab2ce3c3c1e756d3ac1ecde4f9a2cd 100644 (file)
@@ -22,6 +22,11 @@ int main(int argc, char **argv)
 
   xsh = xs_daemon_open();
 
+  if (xsh == NULL) {
+    fprintf(stderr, "Failed to contact Xenstored.\n");
+    return 1;
+  }
+
   xs_debug_command(xsh, argv[1], NULL, 0);
 
   xs_daemon_close(xsh);